ZigBee

ZigBee is a wireless technology which provides connection between the devices. It is the only open global standard to fulfill the needs of low cost, low power wireless network used for device monitoring and control. The ZigBee standard is based on IEEE 802.15.4. It operates in ISM (Industrial, Scientific, and Medical) radio bands which include 2.4 GHz, 784 MHz, 868MHz and 915 MHz. Data rate varies from 20 Kb/s to 250 Kb/s.  It supports all network topologies such as star,tree and mesh topology. Its transmission distance is limited to 10 to 100 meters line of sight. It depends on power output and environmental factors. It can use long distance communication using intermediate devices. The data is passed through the mesh network of intermediate devices and it reaches the distant devices. The devices are secured by 128 bit symmetric encryption keys. So the networking is secure. ZigBee also provides long battery life, so it can last for several years. It can be used in several applications such as wireless light switches, smart grid, medical devices etc. It is simpler and less expensive than BluetoothWi-Fi etc. XBee and other XBee enabled devices provide connection to several other devices.

            Zigbee Zigbee pin diagram

                                                                   Zigbee                                                                                                                           Zigbee Pin diagram

Arduino

It is a simple microcontroller board. It is an open source computing platform and has an environment for developing software for the Arduino board. It can be used to make computers. It is used to create interactive projects. It takes input from sensors or switches and controls the outputs. Arduino boards are inexpensive compared to other microcontroller based devices. It can stand-alone or can communicate with the software of the computer. Arduino software can run on Windows, Linux and Macintosh OSX. It provides an Integrated Development Environment (IDE) which is written on Java for programming microcontrollers. It supports C, C++ programming languages. So anyone who knows the basic programming C can easily access Arduino IDE. It is very simple. Arduino has built-in functions. It can access serial port. It does not need to access the register details. It can simply call the functions and easily perform the functions. So the coding and debugging are fast and efficient. Arduino IDE displays the data which is into and out of the serial port.

                                          Arduino

                                                                                                                              Arduino

Interfacing ZigBee with Arduino

It is very easy to interface the ZigBee with Arduino. Before interfacing, the user must know about the series. Series one is better for beginners. It can communicate with communication devices, sensors etc. If two ZigBee modules are of same types, then they can communicate with each other. To achieve communication between two ZigBee, first one ZigBee is connected to Arduino and the other ZigBee is connected to sensor, microcontroller or computer. There is no need of additional electronics to connect the ZigBee with Arduino. After that, configuration is set on two modules. The below figure shows the interfacing of ZigBee with Arduino. The supply voltage of module is regulated to 5V and 3.3V. The VCC of ZigBee module is connected to 3.3V of Arduino and GND of ZigBee is connected to the GND of Arduino. The figure shows that the transmitter and receiver pin of ZigBee is connected to the transmitter and receiver pin of Arduino. Using Arduino board, the ZigBee module can be connected with the microcontroller.

                      Zigbee Ardino Interfacing

                                                                                                       Interfacing Zigbee with Arduino

Configuration of ZigBee

To configure the ZigBee,

  • First the ZigBee module must be connected to the computer using its serial adapter.
  • For windows, puTTy or virtual terminal must be downloaded.
  • The serial port of computer is set to 9600 baud rate, 8 data bits, 1 stop bit and no parity.
  • Then click on the LOCAL ECHO BOX and click OK.
  • The time session must be saved. Then click the CONNECT button of virtual terminal.
  • After connection with ZigBee, the name of session is given. 
  • After these steps; the connection is occurred with the ZigBee module.
  • To configure the ZigBee module, AT commands can also be used.

The procedures given above can be used to configure other ZigBee modules if required. Connect the other ZigBee module with the serial port of the computer. Then repeat the procedure above.  After that; two ZigBee modules can communicate with each other.

Steps to Interface ZigBee with Arduino

Step 1:- Run the X-Ctu software to configure the ZigBee module.

Step 2:- The ZigBee modules can communicate via Arduino boards using the code. A simple code for sending serial data is given below.

Step 3: Code

Void setup( )                    // Initialization settings; then only runs the function.

{

Serial.begin(9600);             //baudrate is setup to 9600

}

Void loop( )                    //The function operates repeatedly until the poweroff.

{

while(serial.available( ) )

{

serial.write(serial.read( ));   // Check whether data is available or not. If data is available, then data is read.                

}}

The above code helps the ZigBee module to work according to the instructions sent by Arduino. In the same way the ZigBee modules can receive instructions from other ZigBee module also. For this case, the instructions or data is received from one ZigBee and this data is sent through the serial pins of the Arduino. For that, one of the ZigBee must be connected with the Arduino, and then the code which is given above is loaded to Arduino. After uploading the code to the Arduino board, the Arduino board can be connected with the other ZigBee module. After these all steps, the ZigBee modules can communicate with each other.

Related Items